#ifndef MULTI_LINE_CHART_H
#define MULTI_LINE_CHART_H

#include <gtkmm/widget.h>
#include <cairomm/cairomm.h>
#include <deque>
#include <vector>

class glMultiLineChart
{
  public:
    glMultiLineChart(float maxval,float minval,int points,int lines);
    virtual ~glMultiLineChart();
    void DrawCall(const Cairo::RefPtr<Cairo::Context>& cr, int width, int height,Gtk::Widget* widget);
    void InputData(float point,int index=0);
    void ClearFrameCounter();
  private:
    void DrawFont(const Cairo::RefPtr<Cairo::Context>& cr,std::string str,int x,int y,Gtk::Widget* widget);
    std::vector<std::deque<float>> oriData;
    std::vector<std::tuple<int,int,int>> LineColorTable;
    int allpoints;
    float minval,maxval;
    long frameCounter=0;
};

#endif
